[wip]: remove @types/jest everywhere#12415
[wip]: remove @types/jest everywhere#12415mrazauskas wants to merge 5 commits intojestjs:mainfrom mrazauskas:remove-types-jest
@types/jest everywhere#12415Conversation
|
Exciting!! I played with this for 15 minutes last night without being able to make TS augment the global env. Hopefully you can figure out the correct incantation 😀 |
|
Found two possible solutions. First was sort of workaround. It augmentation work. The whole idea was to emit a I though to try explicit imports. Why not? Went through all Unfortunately, few tests have |
|
Hm.. Just a transpiler issue? If globals are imported, Babel playground is transpiling the problematic line |
|
Here is a minimal reproduction – https://github.com/mrazauskas/x-jest-globals. I simply added explicit import to this example – https://jestjs.io/docs/next/mock-functions#mocking-partials Only wondering if this is a bug or expected behaviour? |
|
It's supposed to change the import, it's not supposed to tag it in the babel plugin. 😅 Can you open up a bug report with it so we can track it separately? |
|
Closing in favour of #12856 |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This is an experiment to see how easy (or hard) it could be to remove
@types/jestfromjestrepo. Motivation is simple: own types of the repo are good enough (in some cases even better) than the ones from@types/jest.Todo:
examplesdirectory).Test plan
Green CI